<?php

class User
{
  public $lname='Mishra';

  function __set($arg1, $arg2){
    echo __LINE__ , "\n\n";
  }

  function __get($arg1){
    echo __LINE__ , "\n\n";
  }

  function setName()
  {
#setting
$this->lname = 'Singh';
  }

  function getName()
  {
#getting
return $this->lname. "\n\n";
  }

}

$ratnesh = new User;
$ratnesh->setName();
echo $ratnesh->getName();





